///////////////////////////////////////////////////////////
///////////////// Have an itch? Scratch it! ///////////////
///////////////////////// SCRATCH /////////////////////////
/////////////////////  A MUD  Server   ////////////////////
///////////////////// By: Jared Devall ////////////////////
/////////////////////      Thanks:     ////////////////////
/////////////////////  DIKU/Merc/ROM   ////////////////////
///////////////////// Aetas/Deus Gang  ////////////////////
/////////////////////       Beej       ////////////////////
///////////////////////////////////////////////////////////

#ifndef __COMMANDS_H_
#define __COMMANDS_H_

#include "definitions.h"
#include <list>
#include "character.h"

// The base command class
class Command {
	public:
		std::string _name;
		std::string _shortcut;
		int			_level;
		bool		_enabled;
		bool		_omniset;
		std::string _keywords;
		std::string _help;
		virtual ~Command() {};
		virtual bool Execute( Character*, const std::string& args ) { return true; };	
};

// Our command class macro
// defines an Creature command class and
// inlines the setname and setshortcut
// Less work for defining each command
#define DEF_COMMAND( CommandName )				       		  \
class CommandName: public Command {								\
    public:                                         		   	  \
		std::string _name;                             	   	   \
		std::string _shortcut;                         	   	   \
		int			_level;                            	   	  \
		bool        _enabled;                          	   	   \
		bool		_omniset;										\
		void SetShortcut( const std::string& );       	   	   \
		void SetName( const std::string& );        	         \
		void SetLevel( int );                					\
		void SetEnabled( bool );                     	  \
		void SetOmniset( bool );								\
		void SetKeywords( const std::string& );                  \
		void SetHelp( const std::string& );                      \
		CommandName();                                  	     \
		bool Execute( Character*, const std::string& args ); 	 \
};                                                    			 \
                                                                 \
inline void CommandName::SetName( const std::string &name ) {    \
	_name = name;                                                \
	Command::_name = name;                                       \
}                                                                \
                                                                 \
inline void CommandName::SetLevel( int level ) {				 \
	_level = level;                                              \
	Command::_level = level;                                      \
}                                                                 \
                                                                  \
inline void CommandName::SetEnabled( bool value ) {   \
	_enabled = value;                                 \
	Command::_enabled = value;                        \
}                                                     \
                                                                       \
inline void CommandName::SetShortcut( const std::string &shortcut ) {  \
	_shortcut = shortcut;                                              \
	Command::_shortcut = shortcut;                                     \
}																		\
																		\
inline void CommandName::SetOmniset( bool value ) {						\
	_omniset = value;													\
	Command::_omniset = value;											\
}                                                                       \
  \
inline void CommandName::SetKeywords( const std::string& keywords ) {  \
	_keywords = keywords;  \
	Command::_keywords = keywords;  \
}  \
  \
inline void CommandName::SetHelp( const std::string& help ) {  \
	_help = help;  \
	Command::_help = help;  \
}

/////////////////////////////////// regular commands /////////////////////////////////////////
DEF_COMMAND(CmdAedit);
DEF_COMMAND(CmdAlist);
DEF_COMMAND(CmdAsave);
DEF_COMMAND(CmdBoards);
DEF_COMMAND(CmdBuzz);
DEF_COMMAND(CmdClose);
DEF_COMMAND(CmdColors);
DEF_COMMAND(CmdCommands);
DEF_COMMAND(CmdDemote);
DEF_COMMAND(CmdDescription);
DEF_COMMAND(CmdDisable);
DEF_COMMAND(CmdDisconnect);
DEF_COMMAND(CmdDown);
DEF_COMMAND(CmdDrop);
DEF_COMMAND(CmdEast);
DEF_COMMAND(CmdEat);
DEF_COMMAND(CmdEmote);
DEF_COMMAND(CmdEnable);
DEF_COMMAND(CmdGecho);
DEF_COMMAND(CmdGet);
DEF_COMMAND(CmdGive);
DEF_COMMAND(CmdGoto);
DEF_COMMAND(CmdHelp);
DEF_COMMAND(CmdInformation);
DEF_COMMAND(CmdInventory);
DEF_COMMAND(CmdLook);
DEF_COMMAND(CmdMedit);
DEF_COMMAND(CmdMlist);
DEF_COMMAND(CmdMload);
DEF_COMMAND(CmdNorth);
DEF_COMMAND(CmdNotes);
DEF_COMMAND(CmdOedit);
DEF_COMMAND(CmdOlist);
DEF_COMMAND(CmdOload);
DEF_COMMAND(CmdOmninet);
DEF_COMMAND(CmdOmniset);
DEF_COMMAND(CmdOpen);
DEF_COMMAND(CmdPassword);
DEF_COMMAND(CmdPedit);
DEF_COMMAND(CmdPoofin);
DEF_COMMAND(CmdPoofout);
DEF_COMMAND(CmdPoofs);
DEF_COMMAND(CmdPromote);
DEF_COMMAND(CmdPrompt);
DEF_COMMAND(CmdPut);
DEF_COMMAND(CmdQuit);
DEF_COMMAND(CmdReboot);
DEF_COMMAND(CmdRedit);
DEF_COMMAND(CmdReply);
DEF_COMMAND(CmdSave);
DEF_COMMAND(CmdSay);
DEF_COMMAND(CmdScore);
DEF_COMMAND(CmdShutdown);
DEF_COMMAND(CmdSiteban);
DEF_COMMAND(CmdSockets);
DEF_COMMAND(CmdSouth);
DEF_COMMAND(CmdTake);
DEF_COMMAND(CmdTell);
DEF_COMMAND(CmdTimers);
DEF_COMMAND(CmdTitle);
DEF_COMMAND(CmdUp);
DEF_COMMAND(CmdWest);
DEF_COMMAND(CmdWho);
DEF_COMMAND(CmdWhos);
/////////////////////////////////// note edit commands /////////////////////////////////////////
DEF_COMMAND(nCmdBody);
DEF_COMMAND(nCmdCommands);
DEF_COMMAND(nCmdDelete);
DEF_COMMAND(nCmdExit);
DEF_COMMAND(nCmdList);
DEF_COMMAND(nCmdNew);
DEF_COMMAND(nCmdRecipient);
DEF_COMMAND(nCmdSelect);
DEF_COMMAND(nCmdSend);
DEF_COMMAND(nCmdSubject);
DEF_COMMAND(nCmdView);
/////////////////////////////////// area edit commands /////////////////////////////////////////
DEF_COMMAND(aCmdCommands);
DEF_COMMAND(aCmdExit);
DEF_COMMAND(aCmdKeyword);
DEF_COMMAND(aCmdList);
DEF_COMMAND(aCmdMake);
DEF_COMMAND(aCmdName);
DEF_COMMAND(aCmdPermissions);
DEF_COMMAND(aCmdRemove);
DEF_COMMAND(aCmdSelect);
DEF_COMMAND(aCmdView);
/////////////////////////////////// room edit commands /////////////////////////////////////////
DEF_COMMAND(rCmdCommands);
DEF_COMMAND(rCmdDescription);
DEF_COMMAND(rCmdDig);
DEF_COMMAND(rCmdExit);
DEF_COMMAND(rCmdInfo);
DEF_COMMAND(rCmdLink);
DEF_COMMAND(rCmdMake);
DEF_COMMAND(rCmdName);
DEF_COMMAND(rCmdRemove);
DEF_COMMAND(rCmdReset);
DEF_COMMAND(rCmdRlist);
DEF_COMMAND(rCmdSector);
DEF_COMMAND(rCmdUnlink);
/////////////////////////////////// mob edit commands /////////////////////////////////////////
DEF_COMMAND(mCmdAc);
DEF_COMMAND(mCmdAcbash);
DEF_COMMAND(mCmdAcslash);
DEF_COMMAND(mCmdAcpierce);
DEF_COMMAND(mCmdAcexotic);
DEF_COMMAND(mCmdCha);
DEF_COMMAND(mCmdClass);
DEF_COMMAND(mCmdCommands);
DEF_COMMAND(mCmdCon);
DEF_COMMAND(mCmdDr);
DEF_COMMAND(mCmdDescription);
DEF_COMMAND(mCmdDex);
DEF_COMMAND(mCmdExit);
DEF_COMMAND(mCmdGender);
DEF_COMMAND(mCmdHp);
DEF_COMMAND(mCmdHr);
DEF_COMMAND(mCmdInt);
DEF_COMMAND(mCmdLevel);
DEF_COMMAND(mCmdLong);
DEF_COMMAND(mCmdMana);
DEF_COMMAND(mCmdMove);
DEF_COMMAND(mCmdName);
DEF_COMMAND(mCmdRace);
DEF_COMMAND(mCmdSaves);
DEF_COMMAND(mCmdShort);
DEF_COMMAND(mCmdStr);
DEF_COMMAND(mCmdView);
DEF_COMMAND(mCmdWimpy);
DEF_COMMAND(mCmdWis);
/////////////////////////////////// object edit commands /////////////////////////////////////////
DEF_COMMAND(oCmdCommands);
DEF_COMMAND(oCmdDescription);
DEF_COMMAND(oCmdExit);
DEF_COMMAND(oCmdLong);
DEF_COMMAND(oCmdKeywords);
DEF_COMMAND(oCmdShort);
DEF_COMMAND(oCmdView);
/////////////////////////////////// player edit commands /////////////////////////////////////////
DEF_COMMAND(pCmdAge);
DEF_COMMAND(pCmdCommands);
DEF_COMMAND(pCmdExit);
DEF_COMMAND(pCmdEchoColor);
DEF_COMMAND(pCmdGender);
DEF_COMMAND(pCmdLname);
DEF_COMMAND(pCmdName);
/////////////////////////////////// text editor commands /////////////////////////////////////////
DEF_COMMAND(vCmdAdd);
DEF_COMMAND(vCmdExit);
DEF_COMMAND(vCmdHelp);
DEF_COMMAND(vCmdInsert);
DEF_COMMAND(vCmdRemove);
DEF_COMMAND(vCmdReplace);



#endif // commands.h
